#ifndef IMAGE_H_
#define IMAGE_H_

#include <iostream>

using namespace std;

class Extent
{
public:
	Extent() {}

	Extent(double width, double height)
	{
		this->width = width;
		this->height = height;
	}

public:
	double width;
	double height;
};

class Image
{
public:
	virtual ~Image() {}

public:
	virtual void show() = 0;

	virtual Extent getExtent() = 0;
	virtual void setExtent(const Extent& extent) = 0;
};

class RealImage : public Image
{
public:
	virtual ~RealImage() {}

public:
	virtual void show()
	{
		cout<<"RealImage::show"<<endl;
	}

	virtual Extent getExtent()
	{
		cout<<"RealImage::getExtent"<<endl;
		return m_extent;
	}
	virtual void setExtent(const Extent& extent)
	{
		cout<<"RealImage::setExtent"<<endl;
		m_extent = extent;
	}

private:
	Extent m_extent;
};

#endif // IMAGE_H_
